﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PurchaseOrderDetailCostUnitPriceManage.aspx.cs" Inherits="weba.Sales.PurchaseOrderDetailCostUnitPriceManage" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
         <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30" background="../Images/tab_05.gif">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12" height="30">
                                        <img src="../Images/tab_03.gif" width="12" height="30" />
                                    </td>
                                    <td>
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="46%" valign="middle">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td>
                                                                <div align="center">
                                                                    <img src="../images/tb.gif" width="16" height="16" /></div>
                                                            </td>
                                                            <td width="95%">
                                                                <span class="titleBold12px">管理订货单价格明细</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td width="54%" align="right">
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="16" height="30">
                                        <img src="../Images/tab_07.gif" width="16" height="30" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="8" background="../images/tab_12.gif">
                                        &nbsp;
                                    </td>
                                    <td>
                                        <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td width="100" height="30" align="right">
                                                    生产厂家：
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblManufacturerName" runat="server"></asp:Label>
                                                    <asp:Label ID="lblPurchaseOrderID" runat="server" Visible="False"></asp:Label>
                                                    <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                                                </td>
                                            </tr>
                                             <tr>
                                                <td width="100" height="30" align="right">
                                                    编号：
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblOrderNumber" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="100" height="30" align="right">
                                                    订货日期：
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblDateOrder" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="100" height="30" align="right">
                                                    订货人：
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblManagerTrueName" runat="server"></asp:Label>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" align="center">
                                                    <br />
                                                    <hr />
                                                    
                                                    <br />
                                                    <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" Width="100%"
                                                        DataKeyNames="DetailID" 
                                                        onrowcancelingedit="myGridView_RowCancelingEdit" 
                                                        onrowdatabound="myGridView_RowDataBound" onrowediting="myGridView_RowEditing" 
                                                        onrowupdating="myGridView_RowUpdating">
                                                        <Columns>
                                                            <asp:BoundField DataField="DetailID" HeaderText="ID" ReadOnly="True"></asp:BoundField>
                                                            <asp:BoundField DataField="Name" HeaderText="名称" ReadOnly="True" />
                                                            <asp:TemplateField HeaderText="单价">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblCostUnitPrice" runat="server" ></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    ¥<asp:TextBox ID="txtCostUnitPrice" runat="server" Width="50px" Text='<%# Eval("CostUnitPrice") %>'></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                                        ControlToValidate="txtCostUnitPrice" Display="Dynamic" ErrorMessage="请输入成本单价" 
                                                                        ForeColor="White" SetFocusOnError="True" ValidationGroup="edit"></asp:RequiredFieldValidator>
                                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                                        ControlToValidate="txtCostUnitPrice" ErrorMessage="只能输入整数或小数" 
                                                                        ValidationExpression="^(\d)+(\.\d+)?$" ValidationGroup="edit" 
                                                                        Display="Dynamic" ForeColor="White"></asp:RegularExpressionValidator>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:BoundField DataField="Quantity" HeaderText="数量" ReadOnly="True" />
                                                            <asp:BoundField DataField="Subtotal" DataFormatString="{0:c}" HeaderText="小计" 
                                                                ReadOnly="True" />
                                                            <asp:CommandField HeaderText="编辑" ShowEditButton="True" 
                                                                ValidationGroup="edit" />
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="100" height="30" align="right">
                                                    金额：
                                                </td>
                                                <td>
                                                    &nbsp;
                                                    <asp:Label ID="lblSubTotal" runat="server"></asp:Label>
                                                    <asp:Label ID="lblMsg" runat="server" ForeColor="Red"></asp:Label>
                                                </td>
                                            </tr>

                                            <tr>
                                                <td colspan="2" align="center">
                                                    <asp:Button ID="btnOK" runat="server" Text="确定"  Font-Size="16px"
                                                        Width="100px" Height="30px" ValidationGroup="ok" 
                                                        OnClientClick="alert('修改成功！');refreshParent();window.close();" />
                                                    &nbsp;
                                                    <asp:Button ID="btnClose" runat="server" Font-Size="16px" Height="30px" 
                                                        Text="关闭" Width="100px" OnClientClick="window.close();" />
                                                    <br />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="8" background="../images/tab_15.gif">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="35" background="../images/tab_19.gif">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12" height="35">
                                        <img src="../images/tab_18.gif" width="12" height="35" />
                                    </td>
                                    <td align="center">
                                        &nbsp;
                                    </td>
                                    <td width="16">
                                        <img src="../images/tab_20.gif" width="16" height="35" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnOK" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
